package com.atguigu.gulimall.search.vo;

import lombok.Data;

import java.util.List;

/**
 * 我们希望“可能”所有的检索条件构造成一个Vo对象
 * 即不同检索条件携带的参数，比如
 * http://search.gulimall.com/list.html?keyword=1
 *
 * catalog3Id=225&keyword=小米&sort=saleCount_asc&hasStock=0/1&brandId=1&brandId=2
 * &attrs=1_5寸:8寸&attrs=2_16G:8G
 *
 */
@Data
public class SearchParam {
    private String keyword;//页面传递过来的全文匹配关键字
    private Long catalog3Id;//三级分类id

    /**
     *   sort=saleCount_asc/desc
     *   sort=skuPrice_asc/desc
     *   sort=hotScore_asc/desc   综合排序
     */
    private String sort;//排序条件  三选一

    /**
     * 接下来还有好多的过滤条件
     *  hasStock(是否有货)、skuPrice区间、brandId、catalog3Id、attrs
     *  hasStock=0/1
     *  skuPrice=1_500/_500/500_
     *  brandId=1
     *  attrs=1_3G:4G:5G&attrs=2_骁龙845&attrs=4_高清屏
     *
     */
    private Integer hasStock;  //是否只显示有货
    private String skuPrice;  //价格区间查询
    private List<Long> brandId;  //我们支持品牌id进行多选

    private List<String> attrs;  //按照属性进行筛选

    //分页
    private Integer pageNum = 1;   //页码

    private String queryString;  //为面包屑导航特供
}

